package apIExercise.exception;

public class FianllDemo {
    public static void main(String[] args) {
        /*
        System.out.println("从阿芬开始...");
        try{
            String a="";
            System.out.println(a.charAt(0));
        }catch (IndexOutOfBoundsException e){
            System.out.println("出现异常并解决了");
        }finally {
            System.out.println("阿芬周末睡大觉");
        }
        System.out.println("到阿芬结束...");

         */
        String a="";
        try {
            System.out.println(a.charAt(0));
        }catch (Exception e){
            System.out.println("出错并解决");
        }finally {
            System.out.println("阿芬名叫阿芬");
        }
    }
}
